class Game(object):
    def __init__(self,life=200,attack=150,defense=200,money=200,win=False,quit=False):
        self.life=life
        self.attack=attack
        self.defense=defense
        self.money=money
        self.win=win
        self.quit=quit

    def weapon_store(self,):
        print('''
    [Weapon store]
    Please make your choice:
    1.Buy knife:$10,attack+10
    2.Buy sword:$20,attack+20
    3.Buy Huge knife:$50,attack+40
    4.Buy long stick:$70,attack+60
    5.Buy Big shield:$20,defense+30
    6.Buy Big armor:$50,defense+60
    7.Get out
    ''')
        while True:
            chooseweapon=int(input('Choose weapon:'))
            if chooseweapon==1:
                if self.money<10:
                    print('Failed!')
                else:
                    print('Succeeded!')
                    self.money-=10
                    self.attack+=10
            elif chooseweapon==2:
                if self.money<20:
                    print('Failed!')
                else:
                    print('Succeeded!')
                    self.money-=20
                    self.attack+=20
            elif chooseweapon==3:
                if self.money<50:
                    print('Failed!')
                else:
                    print('Succeeded!')
                    self.money-=50
                    self.attack+=40
            elif chooseweapon==4:
                if self.money<70:
                    print('Failed!')
                else:
                    print('Succeeded!')
                    self.money-=70
                    self.attack+=60
            elif chooseweapon==5:
                if self.money<20:
                    print('Failed!')
                else:
                    print('Succeeded!')
                    self.money-=20
                    self.defense+=30
            elif chooseweapon==6:
                if self.money<50:
                    print('Failed!')
                else:
                    self.money-=50
                    self.defense+=60
            elif chooseweapon==7:
                break
        self.main()

    def main(self):
        print('''
    Please make your choice:
    1.Go to the weapon store
    2.Go to the drug store
    3.Kill a small monster
    4.Kill a big monster
    5.Quit
    6.Show your situation
        ''')
        while True:
            choose=int(input('Choose:'))
            if self.life<=0:
                print('You died!')
                break
            if self.win:
                print('Congratulations!You win!')
                break
            if choose==6:
                print('Your life: %d'%self.life)
                print('Your ability of attacking: %d'%self.attack)
                print('Your ability of defensing: %d'%self.defense)
                print('Your money: %d'%self.money)
            elif choose==1:
                self.weapon_store()
            elif choose==5:
                print('Game Ended.')
                self.quit=True
            else:
                print('Please Choose again!')
            if self.quit:
                break

if __name__ == '__main__':
    print(r'''Game started.
    Hello!Welcome to Jack's KillMonsterGame!
    [Town]
    A town which has 1000 years' history.5
    There is a river and a forest nearby.
    There are many people in the town.
    Also,There is a weapon store and a drug store.
    ''')
    game=Game()
    game.main()